<?php echo form_button(array('id'=>'add-language', 'onClick'=>'openPopup()','name'=>'add', 'class'=>'btn blue', 'value'=>lang('escort_language_add_language'), 'content'=>lang('escort_language_add_language')))?>
<section class="item">
<?php
	if($languageList){
?>
		<table class="table-list">
			<tr>
				<th><?php echo lang('escort_language_id')?></th>
				<th><span><?php echo lang('escort_language_name')?></span></th>
				<th><span><?php echo lang('escort_language_code')?></span></th>
				<th class="actions"><?php echo lang('escort_language_actions')?></th>
			</tr>
			
	<?php
		foreach ($languageList as $language){ 
	?>
			<tr>
				<td>
					<?php echo $language->id ?>
				</td>
				<td class="collapse">
					<?php echo $language->language ?>
				</td>
				<td class="collapse">
					<?php echo $language->code ?>
				</td>
				<td class="actions">
				<a class="button edit" onclick="return editLanguage('<?php echo $language->id ?>')" href="#"><?php echo lang('escort_language_edit_language')?></a>
				<a class="button delete" onclick="return deleteLanguage('<?php echo $language->id ?>', '<?php echo lang('escort_language_delete_confirm')?>')" href="#"><?php echo lang('escort_language_delete_language')?></a>
				</td>
			</tr>
	<?php
		}
	?>
		</table>
<?php
	}else{ 
?>
	<p>
		<?php echo lang('escort_language_no_language')?>
	</p>
<?php
	} 
?>
</section>

<div id="basic-modal-content-language">
	<div class="popup-body language-popup">
		<section class="title">
			<h4><?php echo lang('escort_language_add_language')?></h4>
		</section>
		<form id="add-language-form" action="">
			<section class="item">
				<div class="form_inputs">
					<fieldset>
						<ul>
							<li class="even">
								<label for="first_name"><?php echo lang('escort_language_name')?><span>*</span></label>
								<div class="input">
									<input type="hidden" value="" name="language_id" id="language_id"/>
									<input class="required" type="text" id="language" value="" name="language">
								</div>
							</li>
							<li class="odd">
								<label for="first_name"><?php echo lang('escort_language_code')?><span>*</span></label>
								<div class="input">
									<!--<input class="required" type="text" id="language_code" value="" name="language_code"> -->
									<?php echo form_dropdown('language_code', $languageCodeList, '', 'id="language_code"')?>
								</div>
							</li>
						</ul>
					</fieldset>
				</div>
				<div>
					<?php echo form_button(array('id'=>'save-language', 'onClick'=>'saveLanguage()','name'=>'add', 'class'=>'btn blue', 'value'=>lang('escort_language_save'), 'content'=>lang('escort_language_save')))?>
					<?php echo form_button(array('id'=>'cancel-language', 'name'=>'add', 'class'=>'btn blue modalCloseImg simplemodal-close', 'value'=>lang('escort_language_cancel'), 'content'=>lang('escort_language_cancel')))?>
				</div>
			</section>
		</form>
	</div>
</div>